unit ucAgreementWindowSizePosition;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 
  Dialogs, ComCtrls, ToolWin, Grids, DBGridEh, StdCtrls;

type
  TfcAgreementWindowSizePosition = class(TFrame)
    GroupBox1: TGroupBox;
    DBGridEh1: TDBGridEh;
    tbAgreementWindowSizePosition: TToolBar;
    tbAddAgreementWindowSizePosition: TToolButton;
    tbDelAgreementWindowSizePosition: TToolButton;
    procedure tbAddAgreementWindowSizePositionClick(Sender: TObject);
    procedure tbDelAgreementWindowSizePositionClick(Sender: TObject);
    procedure DBGridEh1KeyPress(Sender: TObject; var Key: Char);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

implementation

uses uDBData;

{$R *.dfm}

procedure TfcAgreementWindowSizePosition.tbAddAgreementWindowSizePositionClick(
  Sender: TObject);
begin
  fDBData.InsertRecord(fDBData.dAgreementWindowSizePosition);
end;

procedure TfcAgreementWindowSizePosition.tbDelAgreementWindowSizePositionClick(
  Sender: TObject);
begin
  fDBData.DeleteRecord(fDBData.dAgreementWindowSizePosition);
end;

procedure TfcAgreementWindowSizePosition.DBGridEh1KeyPress(Sender: TObject;
  var Key: Char);
begin
  if Key = #13 then (Sender as TDBGridEh).DataSource.DataSet.Post;
end;

end.
